            <% content_for :sidebar do -%>
            
            <% if current_user != @user -%>
            <div class="side_box">
                <ul class="menu">
                    <li><%= image_tag("email_go.png", :align=>"absmiddle")%> <%= link_to "给#{@user.display_name}发一封站内邮件", deliver_message_path(@user.login) %></li>
                </ul>
            </div>
            <% end -%>
            
            <% if !current_user.nil? && current_user == @user -%>
            <%= render :partial => 'talks/form' %>
            <% end -%>
              
            <% if @friends.size > 0 -%>
            <div class="tab">
  		<h3><%= @user.display_name%>的好友(<%= link_to "浏览全部", friends_user_path(@user.login) %>)</h3>
	    </div>
	    <div class="clear">
		<%= render :partial => "shared/userlist", :object => @friends %>
	    </div>
            <% end -%>
            
            <% if @user.groups.size > 0 -%>
            <div class="tab">
  		<h3><%= @user.display_name %>参加的小组</h3>
	    </div>
	    <div class="clear">
		<%= render :partial => 'shared/grouplist', :object => @user.groups%>
	    </div>
            <% end -%>
	    <% end -%>
            
            <% content_for :navbar do -%>
            <div class="box">
                <img class="map" align="absmiddle" alt="You are here" src="/images/map.png"/>
                当前位置
                » <%= link_to "您这儿", :controller =>'browse', :action => 'index' %> 
                » <%= link_to "#{@user.display_name}", user_path(@user.login) %>
                <b>
                (<%= @user.current_status %>) 
                <% if !current_user.nil? && current_user != @user && current_user.is_friends_with?(@user) -%>
                (我的好友)
                <% elsif !current_user.nil? && current_user != @user -%>
                <%= image_tag("/images/loadingw.gif", :id => "loading-gif", :style => "display:none")%>
                <span id="update_div">
                (
                    <% form_remote_tag(:update => "update_div", :url => connect_user_path(@user), :loading => "Element.show('loading-gif'),Element.hide('update_div')",:complete => "Element.hide('loading-gif'),Element.show('update_div')", :method => :post) do -%>
                        <%= submit_tag '加为好友' %>
                    <% end -%>
                )
                </span>
                <% end -%>
                </b>
                <%= feed_icon_tag @user.display_name, formatted_posts_user_path(@user.login, :rss) %>
            </div>
            <% end -%>
            
            <%= render :partial => 'profile', :object =>@user%>

            <div class="box">
                <ul class="tabs-nav">
                    <li class="active"><%= link_to "<span>#{@user.display_name} 最近发布的帖子</span>", user_path(@user.login) %> </li>
                    <li class=""><%= link_to "<span>#{@user.display_name} 最近回复的帖子</span>", replies_user_path(@user.login) %></li>
                </ul>
                <%= render :partial=>'profilePosts', :object => @posts%>
            </div>